package org.microdream.easy.deploy.po;

import ice.server.comm.PoExtender;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "d_group", schema = "easydeploy", catalog = "")
public class DGroup  extends PoExtender implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer id;
    private String groupName;
    private String groupCode;
    private String rentCode;
    private String updateUser;
    private Timestamp updateTime;
    private Integer isDelete;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "group_name")
    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    @Basic
    @Column(name = "group_code")
    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    @Basic
    @Column(name = "rent_code")
    public String getRentCode() {
        return rentCode;
    }

    public void setRentCode(String rentCode) {
        this.rentCode = rentCode;
    }

    @Basic
    @Column(name = "update_user")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DGroup dGroup = (DGroup) o;
        return id == dGroup.id &&
                Objects.equals(groupName, dGroup.groupName) &&
                Objects.equals(groupCode, dGroup.groupCode) &&
                Objects.equals(rentCode, dGroup.rentCode) &&
                Objects.equals(updateUser, dGroup.updateUser) &&
                Objects.equals(updateTime, dGroup.updateTime) &&
                Objects.equals(isDelete, dGroup.isDelete);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, groupName, groupCode, rentCode, updateUser, updateTime, isDelete);
    }
}
